package org.jeecg.modules.power.records.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.app.v1.device.entity.ApiDeviceOfflineEntity;
import org.jeecg.modules.app.v1.home.entity.*;
import org.jeecg.modules.power.records.entity.YlDeviceStatusRecords;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @Description: 设备空仓、满仓、离线时长统计
 * @Author: jeecg-boot
 * @Date:   2024-07-31
 * @Version: V1.0
 */
public interface IYlDeviceStatusRecordsService extends IService<YlDeviceStatusRecords> {
    /**
     * 首页设备统计
     * @param categoryId
     * @param flag
     * @param groupId
     * @return
     */
    ApiHomeDeviceEntity countDeviceForHome(String categoryId, String flag, String groupId);
    /**
     * 空仓、满仓、离线设备统计
     * @param param
     * @return
     */
    ApiEmptyDeviceEntity countEmptyDevice(DeviceParam param);

    /**
     * 具体门店空仓、满仓、离线设备统计及设备信息
     * @param param
     * @return
     */
    List<ApiEmptyDeviceEntityExtends> shopDevice(Page<ApiEmptyDeviceEntityExtends> page, DeviceParam param);
    /**
     * 具体门店空仓、满仓、离线设备统计及设备信息
     * @param param
     * @return
     */
    List<Device> shopEmptyDevice(DeviceParam param);
    /**
     * 门店统计-设备数据
     * @param shopId
     * @return
     */
    ApiHomeDeviceEntity countShopDevice(String shopId);
    /**
     * 门店统计-设备详情-设备离线记录
     * @param deviceId
     * @return
     */
    IPage<ApiDeviceOfflineEntity> offlineRecords(Page<ApiDeviceOfflineEntity> page, String deviceId);
}
